package com.crazy.jiakoulachang.service;

import com.github.pagehelper.PageInfo;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.UnsupportedEncodingException;

/**
 * @author: 卢辉宇
 * @date: 2023/3/15 21:42
 * @description:
 */
public interface ProductService {
    void add(String userName, String number, String productType,Double weight,String details);

    PageInfo getPage(int currentPage, int pageSize);

    void deleteByProductId(Integer productId);

    void updateProductAndUser(Integer productId,String userName, String number, String productType, Double weight, Double netReceipts, String details);

    PageInfo selectNotPay(int currentPage, int pageSize);

    PageInfo selectByCreateTime(int currentPage, int pageSize, String startTime, String endTime);

    void exportData(HttpServletResponse response) throws IOException;

    void downByCreateTime(HttpServletResponse response, String startTime, String endTime) throws IOException;

    void sale(String productType, Double weight, Double price, String details);

    void saleEdit(Integer productId, String productType, Double weight, Double price, Double netReceipts, String details);

    Double selectGeneralIncomeByCreateTime(String startTime, String endTime);
}
